package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.NewsTypeExample.E_CODE;
import static org.jsola.hr.example.NewsTypeExample.E_NAME;
import static org.jsola.hr.example.NewsTypeExample.E_NEWS_GROUP_ID;
import static org.jsola.hr.example.NewsTypeExample.M_CODE_MAX;
import static org.jsola.hr.example.NewsTypeExample.M_NAME_MAX;
import static org.jsola.hr.example.NewsTypeExample.M_NEWS_GROUP_ID_MAX;
import static org.jsola.hr.example.NewsTypeExample.N_CODE;
import static org.jsola.hr.example.NewsTypeExample.N_NAME;
import static org.jsola.hr.example.NewsTypeExample.N_NEWS_GROUP_ID;

/**
 * 官网信息的类型
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【官网信息的类型】的参数")
@Data
public class NewsTypeUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_NEWS_GROUP_ID, example = E_NEWS_GROUP_ID)
    @Length(max = 32, message = M_NEWS_GROUP_ID_MAX)
    private String newsGroupId;

    @ApiModelProperty(notes = N_CODE, example = E_CODE)
    @Length(max = 50, message = M_CODE_MAX)
    private String code;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    @Length(max = 2147483647, message = M_NAME_MAX)
    private String name;


}

